home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 882 b | 46 lines | [TEXT/CWIE] |
- // OSError.h
-
- #ifndef OSError_h
- #define OSError_h
-
- #ifndef Integers_h
- #include "Integers.h"
- #endif
-
- class OSError
- {
- private:
- OSErr error;
-
- static void AnnounceDuplication( OSErr );
- static void AnnounceCancellation( OSErr lost, OSErr kept );
- static void AnnounceDestruction( OSErr destroyed );
- static void AnnounceThrow( OSErr );
- static void AnnounceError( OSErr );
-
- public:
- OSError() : error( 0 ) {}
- OSError( OSErr e ) : error( e ) {}
- OSError( OSError& e );
-
- ~OSError();
-
- operator OSErr() const { return error; }
-
- bool OK() const { return error == noErr; }
- bool operator==( OSErr e ) const { return error == e; }
-
- void operator=( OSErr );
- void operator=( OSError& );
-
- void Fix() { error = noErr; }
- void Fix( OSErr );
-
- void Throw() const;
- void Throw( OSErr ) const;
-
- void Debug() const;
- };
-
- #endif
-